package Class.Homemade.demo0525.demo3;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 姚东名
 * Date: 2024-05-25
 * Time: 21:50
 */
public class Test {
    public static void main(String[] args) {
        //对Computer类的 对象实例化
        Computer computer = new Computer();
        //打开电脑：
        computer.open();
        //调用接口,连接键盘
        computer.useUsbDevice(new KeyBoard());
        //调用接口，连接鼠标
        computer.useUsbDevice(new Mouse());
        //关闭电脑
        computer.close();
    }
}
